﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Forms;

namespace BIM_WPF
{
    /// <summary>
    /// VoxelAllWindow.xaml 的交互逻辑
    /// </summary>
    public partial class VoxelAllWindow : Window
    {
        

        public VoxelAllWindow()
        {
            InitializeComponent();
        }

        private void On_Path_Click(object sender, RoutedEventArgs e)
        {
            FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
            DialogResult result = folderBrowserDialog.ShowDialog();
            if (result == System.Windows.Forms.DialogResult.OK)
            {
                PathResultLabel.Text = folderBrowserDialog.SelectedPath;
            }
        }

        private void On_Confirm_Click(object sender, RoutedEventArgs e)
        {
            bool isFromLst = FromLstBtn.IsChecked == true;
            InteropInterface.OpVoxelAll(PathResultLabel.Text, uint.Parse(VoxelText.Text), isFromLst);
            this.Close();
        }

        private void On_Cancel_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
